﻿<!DOCTYPE html>
<html lang="en" >
<head>
	<meta charset="UTF-8">
	<title>三维菱形隧道动画特效 - HTML5技术展览室</title>


		<link rel="stylesheet" href="css/style.css">

</head>
<body>

	<canvas></canvas>

	<script>
		p = [
			[389, 246, 0],
			[410, 255, 20],
			[413, 268, 7],
			[431, 261, 12],
			[418, 244, 30],
			[416, 217, 25],
			[420, 205, 8],
			[427, 227, -20],
			[432, 236, 5],
			[444, 228, 12],
			[451, 232, 41],
			[446, 246, 72],
			[443, 264, 96],
			[446, 278, 65],
			[463, 267, 20],
			[460, 258, -10],
			[464, 243, -20],
			[459, 233, 0],
			[475, 225, 22],
			[484, 225, 29],
			[490, 214, 51],
			[476, 202, 55],
			[462, 202, 55],
			[446, 205, 42],
			[440, 192, 42],
			[430, 183, 72],
			[413, 184, 58],
			[406, 191, 32],
			[406, 207, 0],
			[402, 220, 0],
			[390, 222, 20],
			[385, 228, 10],
			[389, 246, 0]
		];
	</script>
	<audio controls autoplay="autoplay" loop="loop" hidden="hidden">
		<source src="https://mingxin142.gitee.io/audio/2.mp3" type="audio/mpeg" />

		<script src='js/three.min.js'></script>
		<script src="js/index.js"></script>
		<script>
			//隐藏右键
			// document.oncontextmenu = function (event){
			//     if(window.event){
			//     event = window.event;
			//     }try{
			//     var the = event.srcElement;
			//     if (!((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){
			//     return false;
			//     }
			//     return true;
			//     }catch (e){
			//     return false;
			//     }
			// }
		
			// debugger部分
				 setInterval(function() {
				 check();
				 }, 500);
				 var check = function() {
					 function doCheck(a) {
					 if (('' + a / a)['length'] !== 1 || a % 20 === 0) {
						 (function() {}['constructor']('debugger')());
					 } else {
						 (function() {}['constructor']('debugger')());
					 }
					 doCheck(++a);
					 }
					 try {
					 doCheck(0);
					} catch (err) {}
				 };
				 check();
		
				// ctrl+s保存
				document.onkeydown = function() {
					if ((e.ctrlKey) && (e.keyCode == 83)) { //ctrl+s
						return false;
					}
				}
				window.addEventListener("keydown", function(e) {
					//可以判断是不是mac，如果是mac,ctrl变为花键
					//event.preventDefault() 方法阻止元素发生默认的行为。
					if((e.key=='s'||e.key=='S')&&(navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)){
						e.preventDefault();
					}
				}, false);
				// F12
				document.onkeydown = function(){
					if(window.event && window.event.keyCode == 123) {
						event.keyCode=0;
						event.returnValue=false;
					}
					if(window.event && window.event.keyCode == 13) {
						window.event.keyCode = 505;
					}
					if(window.event && window.event.keyCode == 8) {
						window.event.returnValue=false;
					}
				}
			//宽高
			 var threshold = 160; // 打开控制台的宽或高阈值  
			// // 每秒检查一次  
			 window.setInterval(function() {  
				 if (window.outerWidth - window.innerWidth > threshold ||   
				 window.outerHeight - window.innerHeight > threshold) {  
					 // 如果打开控制台，则刷新页面  
					 window.location.reload();  
				 }  
			 }, 1e3);
		
			//debug调试时跳转页面
			 var element = new Image();
			 Object.defineProperty(element,'id',{get:function(){window.location.href="https://pic.downk.cc/item/5fe1a6073ffa7d37b349bf90.jpg"}});
			 console.log(element);
		</script>
</body>
</html>